    <div class="row">
		  <div class="col-xs-6 col-md-3">
      <form action="">
		    <div class="input-group">
		      <input type="text" class="form-control" name="search" placeholder="名称..." value="<?php echo $search;?>">
		      <span class="input-group-btn">
		        <button class="btn btn-default" type="submit"><span class="glyphicon glyphicon-search"></span></button>
		      </span>
		    </div>
      </form>
		  </div>
		  <div class="col-xs-6 col-md-9">
		  		<a href="<?php echo site_url('admin/product/form');?>" class="btn btn-success pull-right">新增</a>
		  </div>
		</div>
          <div class="table-responsive">
            <table class="table table-striped">
              <thead>
                <tr>
                  <th>#</th>
                  <th width="60">缩略图</th>
                  <th>商品中文名称</th>
                  <th>地区</th>
                  <th>管理组</th>
                  <th>管理员</th>
                  <th>时间</th>
                  <th width="200">操作</th>
                </tr>
              </thead>
              <tbody>
              	<?php foreach ($list as $item):?>
                  <tr>
                      <td><?=$item['id']?></td>
                      <td><img width="60" height="60" src="<?=$item['thumb']?>" /></td>
                      <td><?=$item['name']?></td>
                      <td><?=$item['location']?></td>
                      <td>一组</td>
                      <td><?=$item['user']?></td>
                      <td><p>创建:<?=$item['created_at']?></p><p>修改:<?=$item['update_at']?></p></td>
                      <td>
                          <div class="btn-group" role="group" aria-label="...">
                            <a href="<?php echo site_url('admin/product/form/'.$item['id']); ?>" class="btn btn-primary btn-sm">编辑</a>
                            <a type="button" target="_blank" href="http://<?=$item['host']?>/<?=$item['uri']?>.html" class="btn btn-info btn-sm">查看</a>
                            <button type="button" onclick="product_copy(<?php echo $item['id'];?>);" class="btn btn-warning btn-sm">复制</button>
                            <button type="button" onclick="product_delete(<?php echo $item['id'];?>);" class="btn btn-danger btn-sm">删除</button>
                          </div>
                      </td>
                  </tr>
              <?php endforeach;?>
              </tbody>
            </table>
            <?php echo $pagenation;?>
          </div>
    
 <script type="text/javascript">
function product_delete(id){
	layer.confirm('确定删除？', {
		  btn: ['删除','取消'] //按钮
		}, function(){
      $.post('<?php echo site_url("admin/product/delete");?>',{id:id},function(data){
        if(data.statu=='ok'){
          layer.msg('删除成功！', {icon: 1});
          setTimeout(function(){
            location.reload();
          },1000)
        }else{
          layer.msg(data.message, {icon: 2});
        }
      },'json');
		  
		});
}

</script>
        